<?php defined('SYSPATH') or die('No direct access allowed.');

class Model_News extends ORM
{
    protected $_db = 'default';
    protected $_table_name = 'news';
    
    public function rules()
    {
        return array(
            'name' => array(
                array('not_empty'),
                array('regex', array(':value', '|^[a-zA-Z0-9\-]+$|'))
            ),
            'html_title' => array(
                array('not_empty'),    
            ),
            'html_description' => array(
                array('max_length', array(':value', 250)),    
            ),
            'html_keywords' => array(
                array('max_length', array(':value', 250)),    
            ),            
        );
    }
}